package com.service;


import com.dao.DepDAO;
import com.dao.EmpDAO;
import com.pojo.Dep;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

   @Service
    public class DepService {

    @Autowired
    private DepDAO depDAO;

    @Autowired
    private EmpDAO empDAO;

    public void addDep(Dep dep)
    {
        depDAO.save(dep);
    }

    public List findAll()
    {
        
        //return depDAO.getAll();
        return empDAO.getAll();
    }


}
